//首页
$(document).ready(function () {
    $("#gncd").click(function () {
        $(".shouye").css("left", "150px");
        $(".left_sidebar").css("left", "0px");
    });
    //上传图片关闭按钮
    $(".sxsb_close").click(function () {
        $(this).parent("li").css("display", "none");
    });
});
//下拉菜单
$(document).ready(function () {
    $("#shiju1").click(function () {
        $("#ul_select1").slideToggle("slow");
        $("#ul_select2").fadeOut("fast");
        $("#ul_select3").fadeOut("fast");
    });
    var selecttext = $('#shiju1 > .shiju_lf');
    var selectmain = $('#ul_select1');
    var lis = selectmain.find('li');
    for (var i = 0; i < lis.length; i++) {
        lis[i].onclick = function () {
            var textval = $(this).html();
            selectmain.hide();
            selecttext.text(decodeURIComponent(textval));
        }
    }
    $("#ul_select1 > li").click(function () {
        $("#ul_select1").slideUp("slow");
    });
});
$(document).ready(function () {
    $("#shiju2").click(function () {
        $("#ul_select2").slideToggle("slow");
        $("#ul_select1").fadeOut("fast");
        $("#ul_select3").fadeOut("fast");
    });
    var selecttext = $('#shiju2 > .shiju_lf');
    var selectmain = $('#ul_select2');
    var lis = selectmain.find('li');
    for (var i = 0; i < lis.length; i++) {
        lis[i].onclick = function () {
            var textval = $(this).html();
            selectmain.hide();
            selecttext.text(decodeURIComponent(textval));
        }
    }
    $("#ul_select2 > li").click(function () {
        $("#ul_select2").slideUp("slow");
    });
});
$(document).ready(function () {
    $("#shiju3").click(function () {
        $("#ul_select3").slideToggle("slow");
        $("#ul_select1").fadeOut("fast");
        $("#ul_select2").fadeOut("fast");
    });
    var selecttext = $('#shiju3 > .shiju_lf');
    var selectmain = $('#ul_select3');
    var lis = selectmain.find('li');
    for (var i = 0; i < lis.length; i++) {
        lis[i].onclick = function () {
            var textval = $(this).html();
            selectmain.hide();
            selecttext.text(decodeURIComponent(textval));
        }
    }
    $("#ul_select3 > li").click(function () {
        $("#ul_select3").slideUp("slow");
    });
    //事项中心

    $(document).ready(function () {
        $("#shiju_sxzx").click(function () {
            $("#ul_select_sxzx").slideToggle("slow");
        });
        var selecttext = $('#shiju_sxzx > .select1_main');
        var selectmain = $('#ul_select_sxzx');
        var lis = selectmain.find('li');
        for (var i = 0; i < lis.length; i++) {
            lis[i].onclick = function () {
                var textval = $(this).html();
//							selectmain.hide();
                selecttext.text(decodeURIComponent(textval));
            }
        }
        $("#ui-radio input").click(function () {
            $("#ul_select_sxzx").slideUp("slow");
        });
    });

//婴儿落户下拉

    $("#spbm").click(function () {
        $("#ul_spbm1").slideToggle("slow");
    });
//市局
    var selecttext = $('.ul_top_li1');
    var selectmain = $('.ul_spbm1_li1');
    var lis = selectmain.find('li');
    for (var i = 0; i < lis.length; i++) {
        lis[i].onclick = function () {
            var textval = $(this).html();
//							selectmain.hide();
            selecttext.text(decodeURIComponent(textval));
        }
    }
//区县					
    var selecttext1 = $('.ul_top_li2');
    var selectmain1 = $('.ul_spbm1_li2');
    var lis = selectmain1.find('li');
    for (var i = 0; i < lis.length; i++) {
        lis[i].onclick = function () {
            var textval1 = $(this).html();
//							selectmain.hide();
            selecttext1.text(decodeURIComponent(textval1));
        }
    }
//派出所
    var selecttext2 = $('#spbm  .shiju_lf');
    var selectmain2 = $('.ul_spbm1_li3');
    var lis = selectmain2.find('li');
    for (var i = 0; i < lis.length; i++) {
        lis[i].onclick = function () {
            var textval2 = $(this).html();
//							selectmain.hide();
            selecttext2.text(decodeURIComponent(textval2));
        }
    }
//市局					
    $(".ul_spbm1_li1 > li").click(function () {
        $(".ul_spbm1_li1").animate({left: '-100%'});
        $(".ul_spbm1_li2").animate({left: '0'});
        $(".ul_top_li2").css("display", "block");
        $(".ul_top_li1").css("color", "#000");
    });
//区县
    $(".ul_spbm1_li2 > li").click(function () {
        $(".ul_spbm1_li2").animate({left: '-100%'});
        $(".ul_spbm1_li3").animate({left: '0'});
        $(".ul_top_li3").css("display", "block");
        $(".ul_top_li2").css("color", "#000");
    });
//派出所
    $(".ul_spbm1_li3 > li").click(function () {
        $(".ywlh_xiala").slideUp();
        $(".ul_top_li3").css("color", "#000");

    });
    $(".ul_top_li3").click(function () {
        $(".ul_spbm1_li3").animate({left: '0'});
        $(".ul_spbm1_li2").animate({left: '-100%'});
        $(".ul_spbm1_li1").animate({left: '-100%'});
        $(".ul_top_li3").css("color", "#F80000");
        $(".ul_top_li1").css("color", "#000");
        $(".ul_top_li2").css("color", "#000");
    });
    $(".ul_top_li2").click(function () {
        $(".ul_spbm1_li2").animate({left: '0'});
        $(".ul_spbm1_li3").animate({left: '100%'});
        $(".ul_top_li3").css("color", "#000");
        $(".ul_top_li1").css("color", "#000");
        $(".ul_top_li2").css("color", "#F80000");
    });
    $(".ul_top_li1").click(function () {
        $(".ul_spbm1_li1").animate({left: '0'});
        $(".ul_spbm1_li2").animate({left: '100%'});
        $(".ul_spbm1_li3").animate({left: '100%'});
        $(".ul_top_li3").css("color", "#000");
        $(".ul_top_li1").css("color", "#F80000");
        $(".ul_top_li2").css("color", "#000");

    });
    //出租屋信息登记
    $(document).ready(function () {
        $("#shiju4").click(function () {
            $("#ul_select4").slideToggle("slow");
            $("#ul_select1").fadeOut("fast");
            $("#ul_select2").fadeOut("fast");
        });
        var selecttext = $('#shiju4 > .shiju_lf');
        var selectmain = $('#ul_select4');
        var lis = selectmain.find('li');
        for (var i = 0; i < lis.length; i++) {
            lis[i].onclick = function () {
                var textval = $(this).html();
                selectmain.hide();
                selecttext.text(decodeURIComponent(textval));
            }
        }
        $("#ul_select4 > li").click(function () {
            $("#ul_select4").slideUp("slow");
        });
    });
    $("#ycz").click(function () {
        $("#yicz").css("display", "block");
    });
    $("#wcz").click(function () {
        $("#yicz").css("display", "none");
    });
    $(".tjzyry_add").click(function () {
        $(".tjzyry").css("display", "block");
    });
    $(".tjzyry_del").click(function () {
        $(".tjzyry").css("display", "none");
    });
//出租屋信息
    $(".bjsc > .bj").click(function () {
        $("#czwxx").animate({left: '-100%'});
        $("#zkxxbj").css("display", "block").animate({left: '0'});
    });
    $("#zjzk").click(function () {
        $("#czwxx").animate({left: '-100%'});
        $("#add_zuke").css("display", "block").animate({left: '0'});
    });
    $(".ui-btn-wrap").click(function () {
        $("#czwxx").animate({left: '0'});
        $("#add_zuke").animate({left: '100%'}).css("display", "none");
        $("#zkxxbj").animate({left: '100%'}).css("display", "none");
    });
    //删除
    $(".sc").click(function () {
        $(this).parents(".czwxx_wrapper").css("display", "none");
    });
    //我的出租屋
    $("#wdczw_btn").click(function () {
        $("#wdczw").animate({left: '-100%'});
        $("#wdczwxz").css("display", "block").animate({left: '0'});
    });
    $("#wdczwxz_i").click(function () {
        $("#wdczw").animate({left: '0'});
        $("#wdczwxz").css("display", "none").animate({left: '100%'});
    });
    $("#ui-btn-lg").click(function () {
        $("#wdczw").animate({left: '0'});
        $("#wdczwxz").css("display", "none").animate({left: '100%'});
        $(".wdczw").addClass("zfdz2");
        $(".zfdz1").removeClass("zfdz2");
    });
    $(".bj").click(function () {
        $("#wdczw").animate({left: '-100%'});
        $("#wdczwxz").css("display", "block").animate({left: '0'});
    });
    $("#xinzeng").click(function () {
        $("#wdczw").animate({left: '-100%'});
        $("#wdczwxz").css("display", "block").animate({left: '0'});
    });
});
